#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
double eps=1e-6;
double a[10];
bool vis[10];
bool same(double x) {return 24.0-eps<=x && x<=24.0+eps;}
bool dfs(int num)
{
    if (num==4)
    {
        for (int i=1; i<=4; i++)
            if (!vis[i] && same(a[i])) return true;
        return false;
    }
    for (int i=1; i<=4; i++)//枚举第一个数 
        if (!vis[i])
        for (int j=i+1; j<=4; j++)//枚举第二个数 
        if (!vis[j])
        {
            vis[j]=1;
            double tmp1=a[i],tmp2=a[j];
            a[i]=tmp1+tmp2;
            if (dfs(num+1)) return true;
            a[i]=tmp1-tmp2;
            if (dfs(num+1)) return true;
            a[i]=tmp2-tmp1;
            if (dfs(num+1)) return true;
            a[i]=tmp1*tmp2;
            if (dfs(num+1)) return true;
            a[i]=tmp1/tmp2;
            if (dfs(num+1)) return true;
            a[i]=tmp2/tmp1;
            if (dfs(num+1)) return true;
            vis[j]=0;
            a[i]=tmp1;//注意回溯 
        }
    return false;
}

int main()
{
    while (scanf("%lf%lf%lf%lf",&a[1],&a[2],&a[3],&a[4]))
    {
        if (a[1]==0&&a[2]==0&&a[3]==0&&a[4]==0) break;
        memset(vis,0,sizeof(vis));
        if (dfs(1)) printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}